package org.example.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.entity.Goods;
import org.example.entity.GoodsAndItem;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;


@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {

    int insertGoods(@Param("goods") Goods goods);

    public int getCounts();

    //联表查询商品表和商品类型
    List<GoodsAndItem> selectGoodsAll(@Param("offset") Integer offset,@Param("limit") Integer limit);

    //获取商品表的总条数
    int getGoodsTotal();

    //修改商品状态
    int updateGoodsStatus(@Param("id") Integer id,@Param("status")Integer status);
}